package Student;

public class Work1 {
    // 定义一个学生接口
    public interface Student {

        void study();
    }


    public interface Athlete {

        void train();
    }


    public interface StudentAthlete extends Student, Athlete {

    }


    public class RegularStudent implements Student {
        @Override
        public void study() {
            System.out.println("Regular student is studying.");
        }
    }


    public class AthleticScholarshipStudent implements StudentAthlete {
        @Override
        public void study() {
            System.out.println("Athletic scholarship student is studying.");
        }

        @Override
        public void train() {
            System.out.println("Athletic scholarship student is training.");
        }
    }


    public class ProfessionalAthlete implements Athlete {
        @Override
        public void train() {
            System.out.println("Professional athlete is training.");
        }
    }


    public class Main {
        public void main(String[] args) {

            RegularStudent regularStudent = new RegularStudent();
            AthleticScholarshipStudent athleticScholarshipStudent = new AthleticScholarshipStudent();
            ProfessionalAthlete professionalAthlete = new ProfessionalAthlete();


            regularStudent.study();
            athleticScholarshipStudent.study();
            athleticScholarshipStudent.train();
            professionalAthlete.train();
        }
    }

}
